#include <iostream>
using std::cout;
using std::endl;
 
int global;
 
int main()
{
	int a = 1;
	int b = 2;
	int &ra = a;
	cout << "地址：" << &a << " " << &b << " " << &ra << endl;
	cout << "值：" << a << " " << b << " " << ra << endl << endl;
        cout << &a << " " << (int*)*(&b+1) << endl << endl;  // ra中保存的地址就是a的地址
	*(&b+1) = (int)&b;
 
	cout << "地址：" << &a << " " << &b << " " << &ra << endl;
	cout << "值：" << a << " " << b << " " << ra << endl;
	*(&b+1) = (int)&b;
	
	ra = 9;
	cout << a << " " << b << " " << ra << endl;
	return 0;
}